<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>企业管理系统</title>
<meta name="renderer" content="webkit"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <link rel="stylesheet" href="layui/css/layui.css" media="all"/>
    <script src="layui/layui.js" type="text/javascript" charset="utf-8"></script>
    <!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- jQuery -->
<script src="../plugins/jquery/jquery.min.js"></script>
<script src="js/ajax.js"></script>
  <script>
    //依赖 element 模块，否则无法进行功能性操作
    layui.use('element', function(){
        var element = layui.element;
    });
    function close() {
		if(confirm("您确定要退出登录？")) {
			$.ajax({
				url:"Sp/outlogin",
				type:"post",
				success:function(){
				},
				error:function(){
				}
			})
			window.location.href="/";
		} else {}
	}
</script>
  <link rel="stylesheet" href="/layui/a.css"  media="all"/>
  <link rel="stylesheet" href="/layui/b.css" media="all"/>
</head>
<body>
<div class="layui-layout layui-layout-admin">
<div style="background-image: url('/image/toubu2.jpg'); background-size:100% 100% ; background-attachment: fixed;" class="layui-header header header-demo">
  <div class="layui-main">
  <label class="layui-label" style="font-size: 30px;color: white;margin-top: 15px;position: absolute;font-family:华文行楷;">HD海德塑业</label>
    <label class="layui-label" style="position: absolute; left: 40%; margin-top: 10px;font-size: 25px;font-family:STSong;color:white">广西海德企业管理系统</label>
    <ul class="layui-nav">
	  <li class="layui-nav-item">
        <a href="javascript:;"> <i class="layui-icon layui-icon-print"></i><span id="printcount" class="layui-badge" style="margin-right: -10px;">0</span></a>
        <dl id="printstatus" class="layui-nav-child" style="left: auto; right: -22px; text-align: center;">
          <dd>
            <a id="layui-spm-event-aliyun">未打印货单<span class="layui-badge-dot" style="margin-top: -5px;"></span></a>
          </dd>
        </dl>
      </li>
	  <li class="layui-nav-item">
        <a href="javascript:;"> <i class="layui-icon layui-icon-notice"></i><span id="yjcount" class="layui-badge" style="margin-right: -10px;">0</span></a>
        <dl id="zyj" class="layui-nav-child" style="left: auto; right: -22px; text-align: center;">
          <dd>
            <a target="_blank" id="layui-spm-event-aliyun">发货货单逾期告警<span class="layui-badge-dot" style="margin-top: -5px;"></span></a>
          </dd>
        </dl>
      </li>
      <li class="layui-nav-item">
        <a id="quxianname" style="font-size: 18px;" href="javascript:;"><!--<span class="layui-badge-dot" style="left:0; right: auto; margin: -4px 0 0 5px;"></span>--> </a>
        <a id="username" style="font-size: 18px;" href="javascript:;"><!--<span class="layui-badge-dot" style="left:0; right: auto; margin: -4px 0 0 5px;"></span>--> </a>
      </li>
      <li class="layui-nav-item layui-hide-xs">
        <a href="javascript:close();" style="font-size: 18px;">退出登录</span></a>
      </li>
    </ul>
  </div>
</div>
  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      
<ul class="layui-nav layui-nav-tree site-demo-nav">
  
  <li id="mate" class="layui-nav-item">
    <a class="javascript:;" href="javascript:;">原料系统</a>
    <dl class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="/addmate.html">原料制单</a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd>
        <a style="margin-left: 22px;" href="/matecon.html">原料管理</a>
      </dd>
    </dl>
  </li>
  
  <li id="sell" class="layui-nav-item">
    <a class="javascript:;" href="javascript:;">货单系统</a>
    <dl class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="/addsell.html">货单制单</a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="/sellcon.html">货单管理</a>
      </dd>
    </dl>
    <dl id='fd' class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="/sellcon2.html">废单管理</a>
      </dd>
    </dl>
  </li>
  <li id="stock" class="layui-nav-item">
    <a class="javascript:;" href="javascript:;">库单系统</a>
    <dl class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="/stock.html">库单制单</a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="/stockGL.html">库单管理</a>
      </dd>
    </dl>
    <dl id="kcxh" class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="/stockXH.html">库单型号</a>
      </dd>
    </dl>
  </li>
  <li id="pay" class="layui-nav-item">
    <a class="javascript:;" href="javascript:;">货款系统</a>
    <dl class="layui-nav-child">
      <dd class="layui-this">
        <a style="margin-left: 22px;" href="paycom.html">货款制单</a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="paycomGL.html">货款管理</a>
      </dd>
    </dl>
  </li>
  <li id="exin" class="layui-nav-item layui-nav-itemed">
    <a class="javascript:;" href="javascript:;">资金系统</a>
    <dl class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="income.html">
          收入制单
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="incomeGL.html">
          收入管理
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="expend.html">
          支出制单
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="layui-this">
        <a style="margin-left: 22px;" href="expendGL.html">
          支出管理
        </a>
      </dd>
    </dl>
  </li>
  <li id="tj" class="layui-nav-item">
    <a class="javascript:;" href="javascript:;">统计报表</a>
    <dl id="yl" class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="yuanliaoTJ.html">
          原料统计
        </a>
      </dd>
    </dl>
    <dl id="hd" class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="huodanTJ.html">
          货单统计
        </a>
      </dd>
    </dl>
    <dl id="sr" class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="incomeTJ.html">
          收入统计
        </a>
      </dd>
    </dl>
    <dl id="zc" class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="expendTJ.html">
          支出统计
        </a>
      </dd>
    </dl>
    <dl id="qk" class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="qiankuanTJ.html">
          欠款统计
        </a>
      </dd>
    </dl>
    <dl id="kc" class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="kucunTJ.html">
          库单统计
        </a>
      </dd>
    </dl>
  </li>
  <li class="layui-nav-item">
    <a class="javascript:;" href="javascript:;">客户信息</a>
    <dl id="addshopper" class="layui-nav-child">
      <dd>
       <a style="margin-left: 22px;" href="/shopper.html">
          添加客户
        </a>
      </dd>
    </dl>
    <dl id="shopper" class="layui-nav-child">
      <dd class="">
         <a style="margin-left: 22px;" href="/shopperGL.html">
          客户管理
        </a>
      </dd>
    </dl>
  </li>
  <li class="layui-nav-item">
    <a class="javascript:;" href="javascript:;">账号</a>
    <dl id="adduser" class="layui-nav-child">
      <dd>
       <a style="margin-left: 22px;" href="/user.html">
          添加账号
        </a>
      </dd>
    </dl>
    <dl id="user" class="layui-nav-child">
      <dd class="">
         <a style="margin-left: 22px;" href="/userGL.html">
          账号管理
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="updatepawod.html">
          修改密码
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a style="margin-left: 22px;" href="javascript:close();">
          注销
        </a>
      </dd>
    </dl>
  </li>
  
  <li class="layui-nav-item" style="height: 30px; text-align: center"></li>
</ul>

    </div>
  </div>
  <div class="layui-tab layui-tab-brief" lay-filter="demoTitle">
    <div class="layui-body layui-tab-content site-demo site-demo-body">
    <div class="layui-tab-title site-demo-title">
      	<!-- <fieldset class="layui-elem-field layui-field-title">
		  <legend>原料制单</legend>
		</fieldset> -->
    </div>
      <div class="layui-tab-item layui-show">
        <div class="layui-main">
          <div id="LAY_preview">
          <form class="layui-form" action="javascript:0;">
          <div class="layui-form-item">
				<label class="layui-form-label">支出用途</label>
				<div class="layui-input-inline">
			        <select name="purpose" lay-search="">
			          <option value="">全部</option>
			          <option value="租金">租金</option>
			          <option value="原料">原料</option>
			          <option value="人工费">人工费</option>
			          <option value="电费">电费</option>
			          <option value="水费">水费</option>
			          <option value="煤气费">煤气费</option>
			          <option value="差旅费">差旅费</option>
			          <option value="油费">油费</option>
			          <option value="运费">运费</option>
			          <option value="伙食费">伙食费</option>
			          <option value="厂房建设费">厂房建设费</option>
			          <option value="设备维护">设备维护</option>
			          <option value="设备费">设备费</option>
			          <option value="配件费">配件费</option>
			          <option value="提成">提成</option>
			          <option value="招待费">招待费</option>
			          <option value="商务费">商务费</option>
			          <option value="其他">其他</option>
			          
			        </select>
				</div>
				<span style="margin-left: 10px; font-size: 15px; margin-right: 8px;">备注</span>
				<div style="width: 13%;" class="layui-inline">
					<input class="layui-input" name="remark" id="remark" autocomplete="off" placeholder="请输入备注">
				</div>
				<span style="margin-left: 10px; font-size: 15px; margin-right: 8px;">时间段</span>
				<div class="layui-inline">
					<input type="text" name="time" class="layui-input" id="test6" autocomplete="off" placeholder=" - ">
				</div>
				<div class="layui-inline">
				<div class="layui-input-inline">
					<button class="layui-btn" id="searchBtn" lay-submit lay-filter="demo1"
						lay-filter="formDemo" style="margin-left: 15px">
						<i class="layui-icon layui-icon-search"></i> 查询
					</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
				</div>
		</div>
		</form>
		</div>
		
		<!--   弹出层************************ -->
        <div class="layui-main" id="test1" style="display:none">
          <div id="LAY_preview">
	<form class="layui-form" action="/Sp/addord" lay-filter="example" method="post">
		<input type="hidden" name="faf" id="faf" value="add">
		<input type="hidden" name="id" id="id" value="1">
	  <div class="layui-form-item">
	    <label class="layui-form-label">支出用途</label>
	    <div class="layui-input-block">
	      <select name="purpose" id="purpose">
	        <option value="租金" selected="selected">租金</option>
				          <option value="原料">原料</option>
				          <option value="人工费">人工费</option>
				          <option value="电费">电费</option>
				          <option value="水费">水费</option>
				          <option value="煤气费">煤气费</option>
				          <option value="差旅费">差旅费</option>
				          <option value="油费">油费</option>
				          <option value="运费">运费</option>
				          <option value="伙食费">伙食费</option>
				          <option value="厂房建设费">厂房建设费</option>
				          <option value="设备维护">设备维护</option>
				          <option value="设备费">设备费</option>
				          <option value="配件费">配件费</option>
				          <option value="提成">提成</option>
				          <option value="招待费">招待费</option>
				          <option value="商务费">商务费</option>
				          <option value="其他">其他</option>
	      </select>
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">金额</label>
	    <div class="layui-input-block">
	      <input type="text" id="money" name="money" lay-verify="required" onblur="value=numzhengze(this.value)" lay-reqtext="请输入金额" placeholder="请输入金额" class="layui-input"/>
	    </div>
	  </div>
	  <div class="layui-form-item">
	      <label class="layui-form-label">时间</label>
	      <div class="layui-input-inline">
	        <input type="text" name="time" id="date" lay-verify="required" lay-reqtext="请选择时间" placeholder="请选择时间" autocomplete="off" class="layui-input"/>
	      </div>
	    </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">备注</label>
	    <div class="layui-input-block">
	      <input type="text" name="remark" id="remarkthis" lay-verify="required" lay-reqtext="备注" placeholder="备注" class="layui-input"/>
	    </div>
	  </div>
	  </form>
	  </div>
	  </div>
		
		
<div class="layui-form-item">  
<table class="layui-hide" id="test" lay-filter="test"></table>
<div id="toolbarDemo" style="display: none;">
  <div class="layui-btn-container">
    <button id="alldele" class="layui-btn layui-btn-sm" lay-event="getCheckData">删除选中</button>
  </div>
</div>
 
<div id="barDemo" style="display: none;">
<div id='uptable'>
  <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</div>
</div>
<script>
function on(){
	var str ='/Sp/seles';
	var inputvalue = document.getElementById("name").value;
    console.log(inputvalue);
	layui.use('table', function(){
		  var table = layui.table;
		table.reload('table', {
			url:'/Sp/seles?inputvalue='+inputvalue 
	      });
	});
}
layui.use('table', function(){
  var table = layui.table;
  var strcookie = document.cookie;//获取cookie字符串 
      var arrcookie = strcookie.split("; ");//分割 
      //遍历匹配 
      for ( var i = 0; i < arrcookie.length; i++) { 
	  console.log(arrcookie[i]); 
          var arr = arrcookie[i].split("="); 
          if (arr[0] == "username"){ 
  		document.getElementById("username").innerHTML=arr[1];
          } 
      } 

　　if(document.getElementById("username").innerHTML.indexOf("销售")!=-1){
		document.getElementById("mate").style.display="none"; 
		document.getElementById("pay").style.display="none"; 
		document.getElementById("exin").style.display="none"; 
		document.getElementById("tj").style.display="none"; 
		document.getElementById("user").style.display="none"; 
		document.getElementById("adduser").style.display="none"; 
		document.getElementById("shopper").style.display="none"; 
		document.getElementById("fd").style.display="none"; 
	}
	if(document.getElementById("username").innerHTML.indexOf("制单")!=-1){
		document.getElementById("exin").style.display="none"; 
		document.getElementById("tj").style.display="none"; 
		document.getElementById("user").style.display="none"; 
		document.getElementById("adduser").style.display="none"; 
		document.getElementById("shopper").style.display="none"; 
		document.getElementById("fd").style.display="none"; 
	}
	if(document.getElementById("username").innerHTML.indexOf("生产")!=-1){
		document.getElementById("mate").style.display="none"; 
		document.getElementById("sell").style.display="none"; 
		document.getElementById("pay").style.display="none"; 
		document.getElementById("exin").style.display="none"; 
		document.getElementById("tj").style.display="none"; 
		document.getElementById("user").style.display="none"; 
		document.getElementById("adduser").style.display="none"; 
		document.getElementById("shopper").style.display="none"; 
		document.getElementById("fd").style.display="none"; 
	}
	if(document.getElementById("username").innerHTML.indexOf("超")==-1){
		document.getElementById("kcxh").style.display="none"; 
		document.getElementById("alldele").style.display="none";
		document.getElementById("uptable").style.display="none"; 
	}
	$.ajax({
		url:"seleoddalltime",
		type:"post",
		success:function(a){
			console.log(a);
			document.getElementById("yjcount").innerHTML=a.count;
		for(var i= 0;i<a.count;i++){
			var demoListView = $('#zyj')
			var str="<dd lay-unselect> <a id='yj"+i+"' href='"+a.href[i]+"'>逾期告警<span class='layui-badge-dot' style='margin-top: -5px;'></span></a></dd>"
			
	          demoListView.append(str);
			document.getElementById('yj'+i).innerHTML=a.str[i];	
		}			
		},
		error:function(){
			console.log("逾期告警发生异常");
		}
	})
	$.ajax({
		url:"Sp/seleprintstatus",
		type:"post",
		success:function(a){
			console.log(a);
			document.getElementById("printcount").innerHTML=a.count;
		for(var i= 0;i<a.count;i++){
			var demoListView = $('#printstatus')
			var str="<dd lay-unselect> <a id='dyyj"+i+"' href='"+a.href[i]+"'>逾期告警<span class='layui-badge-dot' style='margin-top: -5px;'></span></a></dd>"
			
	          demoListView.append(str);
			document.getElementById('dyyj'+i).innerHTML=a.string[i];	
		}			
		},
		error:function(){
			console.log("打印告警发生异常");
		}
	})
  var tableinfo=table.render({
    elem: '#test'
    ,url:'/Sp/exlistall'
    ,toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板
    ,defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义，去除该参数即可
      title: '提示'
      ,layEvent: 'LAYTABLE_TIPS'
      ,icon: 'layui-icon-tips'
    }]
    ,title: '数据表'
    ,cols: [[
      {type: 'checkbox', fixed: 'left'}
      ,{field:'id', title:'ID', width:60, fixed: 'left', unresize: true, sort: true, hide:true}
      ,{type: "numbers", width: 80}
      ,{field:'money', title:'金额', width:120}// ,edit: 'text'单元格编辑
      ,{field:'time', title:'时间', width:200}
      ,{field:'purpose', title:'支出用途', width:160}
      ,{field:'remark', title:'备注', width:450, }
      ,{fixed: 'right', title:'操作', toolbar: '#barDemo', width:200}
    ]]
    ,page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） - 详见文档
      layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
      //,curr: 5 //设定初始在第 5 页
      ,groups: 15 //只显示 1 个连续页码
      , prev: '上一页'                 //上一页文本
      , next: '下一页'                 //下一页文本
      ,first: false //不显示首页
      ,last: '尾页', //不显示尾页
          request : {
              page : 'pageNum', // 页码的参数名称，默认：page
              limit : 'pageSize' // 每页数据量的参数名，默认：limit
          }
    },
    limits: [5,10,20,30,50,100,300,500,1000,2000,5000],
    id:'table'
  });
  //头工具栏事件
  table.on('toolbar(test)', function(obj){
    var checkStatus = table.checkStatus(obj.config.id);
    console.log(table);
    var list =new Array(49);
    switch(obj.event){
      case 'getCheckData':
		if(checkStatus.data.length==0){
			layer.msg("请先选择");
		      break;
		}
		layer.confirm('确定的删除'+checkStatus.data.length+'行', function(index){
        var stu =new Array(49);
		for (var i = 0; i < checkStatus.data.length; i++) {
			stu[i]=checkStatus.data[i].id;
			if(i>49){
				layer.msg("最多只能批量50个");
				break;
			}
		}
		$.ajax({
				url:"Sp/deledisburseall?id="+stu,
				type:"post",
				success:function(a){
					tableinfo.reload();
					layer.msg(a);					
				},
				error:function(){
					layer.msg("发生异常");
				}
			})
		})
      break;
      case 'getCheckLength':
        var data = checkStatus.data;
        layer.msg('选中了：'+ data.length + ' 个');
      break;
      case 'isAll':
        layer.msg(checkStatus.isAll ? '全选': '未全选');
      break;
      
      //自定义头工具栏右侧图标 - 提示
      case 'LAYTABLE_TIPS':
    	  layer.msg('这是工具栏右侧自定义的一个图标按钮');
      break;
    };
  });
  //监听行工具事件
  table.on('tool(test)', function(obj){
    var data = obj.data;
    var id = obj.data.id;
    console.log(obj);
    if(obj.event === 'del'){
		layer.confirm('确定的删除该行', function(index){
			$.ajax({
 				url:"Sp/deledisbursebyid",
 				type:"get",
 				data:{"id":id},
 				success:function(a){
 					//layer.msg(a.result);
 			        obj.del();					
 				},
 				error:function(){
 					layer.msg("发生异常");
 				}
 			})  
        layer.close(index);
      });
    } else if(obj.event === 'edit'){
    	//var cellHtml = $(".layui-table-main").find("tr[data-index="+rowsNum+"]");
    	//var cellTop = cellHtml.offset().top;
    	//$(".layui-table-main").scrollTop(cellTop - 22);
    	//window.location.href="/expend.html?"+id;
    	$.ajax({
		url:"Sp/seledisbursebyid",
		type:"post",
		data:{"id":id},
		dataType:"",
		success:function(a){

			document.getElementById('money').value=a.money;
			document.getElementById('date').value=a.time;
			document.getElementById('purpose').value=a.purpose;
			document.getElementById('remarkthis').value=a.remark;
			document.getElementById('id').value=a.id;
			document.getElementById('faf').value=a.up;
		},
		error:function(){
			layer.msg("发生异常");
		}
	})
    	layer.open({
    		  type:1,
    		  area:['600px','400px'],
    		   title: '型号信息'
    		   ,content: $("#test1"),
    		   shade: 0,
    		   btn: ['提交']
    		   ,btn1: function(index, layero){
    		    	$.ajax({
    					url:"Sp/addordex",
    					type:"post",
    					data:{"id":id,
    						"time":document.getElementById('date').value,
    						"purpose":document.getElementById('purpose').value,
    						"remark":document.getElementById('remarkthis').value,
    						"money":document.getElementById('money').value,
    						"faf":"up"},
    					success:function(a){
     	 					layer.msg("提交成功");
     						tableinfo.reload();
    					},
    					error:function(){
    					}
    				})
    			   layer.closeAll();
    		   },
    		 cancel: function(layero,index){ 
    		    layer.closeAll();
    		   }

    		 }); 
    }
  });
});
</script>
  </div>
  </div>
  </div>
  </div>
  </div>
  <div class="layui-footer footer footer-demo">
  <div class="layui-main">
    <p>
      Build By 广西海德塑料有限责任公司
    </p>
  </div>
</div>
</div>
<div id="LAY_democodejs">
<script>
layui.use(['form', 'layedit', 'laydate','table'], function(){
	  var form = layui.form
	  ,layer = layui.layer
	  ,layedit = layui.layedit
	  ,laydate = layui.laydate;
	  var table = layui.table;
	  form.on('submit(demo1)', function(data){
		  console.log(data);
		  var tableinfo =table.render({
			    elem: '#test'
			    ,url:'/Sp/exlistsearch'
			    ,type:"post"
			    ,where:data.field
			    ,toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板
			    ,defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义，去除该参数即可
			      title: '提示'
			      ,layEvent: 'LAYTABLE_TIPS'
			      ,icon: 'layui-icon-tips'
			    }]
		  		,title: '数据表'
			    ,cols: [[
			      {type: 'checkbox', fixed: 'left'}
			      ,{field:'id', title:'ID', width:60, fixed: 'left', unresize: true, sort: true, hide:true}
			      ,{type: "numbers", width: 80}
			      ,{field:'money', title:'金额', width:120}// ,edit: 'text'单元格编辑
			      ,{field:'time', title:'时间', width:200}
			      ,{field:'purpose', title:'支出用途', width:160}
			      ,{field:'remark', title:'备注', width:450, }
			      ,{fixed: 'right', title:'操作', toolbar: '#barDemo', width:200}
			    ]]
			 	 ,done: function (res, curr, count){
				  $('table').css('width', '100%');
				  //这里设置表格的宽度为100%
				  }
			    ,page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） - 详见文档
			      layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
			      //,curr: 5 //设定初始在第 5 页
			      ,groups: 15 //只显示 1 个连续页码
			      , prev: '上一页'                 //上一页文本
			      , next: '下一页'                 //下一页文本
			      ,first: false //不显示首页
			      ,last: '尾页', //不显示尾页
			          request : {
			              page : 'pageNum', // 页码的参数名称，默认：page
			              limit : 'pageSize' // 每页数据量的参数名，默认：limit
			          }
			    },
			    id:'table'
			  });
		  //data.field,
	 }); 
//日期范围
	  laydate.render({
	    elem: '#test6'
	    ,range: true
	  });
	  //日期
	  laydate.render({
	    elem: '#date',
	    type: 'datetime'
	  });
  
});
</script>
</div>
</body>
</html>